/**
 * 公用api
 */
import service from "@/utils/request"

export default class ApiPublic {
  // 获取当前ip位置判断初始语言
  static getIPInfo() {
    return service({
      url: "https://ipapi.co/json/",
      method: "GET"
    })
  }

  /*
   *  @description 分片上传
   * **/
  static uploadMultiUpload(data) {
    return service({
      url: "upload",
      method: "POST",
      data
    })
  }

  /*
   *  @description 获取DuxiToken
   * **/
  static getDuxiToken(data) {
    return service({
      url: "api/duix",
      method: "POST",
      data
    })
  }

  /*
 *  @description 获取DuxiToken
 * **/
  static generateAvatar(data) {
    return service({
      url: "api/common/body/generateHumanAnimeStyle",
      method: "POST",
      data
    })
  }
}
